package com.aliyun.adb.contest;


import java.util.Arrays;

/**
 * @author Geng
 * @title: Const
 * @projectName adb-contest
 * @description: TODO
 * @date 2021/5/30 -- 11:56
 */
public class Const {

    //write file num
    public static int WRITE_FILE_NUM = 94;

    public static int SPLIT_FILE_NUM = 30;

    //BUFFER_SIZE
    public static long BUFFER_SIZE = 16*1024;

    public static int THREAD_POOL_NUM = 10;
    // no bigger
    public static int WRITER_BUFFER_SIZE = 16*1024;

    //line
    public static long LINE_NUM = 300000000;

    //
    public static int STR_CAPACITY = 2*1024*1024;

    //
    public static long[] COM_MAP;

    //avg flush
    public static long LINE_FLUSH_CNT = 10000000;

    public static boolean USE_OFFSET = false;

    public static int COMMA = 44;
   // public static int NEW_LINE = 10;

    public static int BYTE_LEN = 16*1024*1024;

    static{
        int div = WRITE_FILE_NUM;
        long l2 = Long.MAX_VALUE;
        long avg = l2/div;
        long[] map = new long[div];
        map[0] = avg;
        for(int i = 1;i < div - 1;i++){
            map[i] = avg+map[i-1];
        }
        map[div-1] = l2;
        COM_MAP = map;
    }


    public static void main(String[] args) {
        System.out.println(Arrays.toString(COM_MAP));
    }
}
